home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / AdobeExamples / NX_Text / DrawingViewWraps.psw < prev    next >
Encoding:
Text File  |  1992-12-19  |  2.9 KB  |  111 lines

  1.  
  2. /*
  3.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  4.  *
  5.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  6.  *    System Software Development Kit from Adobe Systems Incorporated,
  7.  *    then this copy is designated as Development Software and its use is
  8.  *    subject to the terms of the License Agreement attached to such Kit.
  9.  *
  10.  * (c)  If this Sample Code is distributed independently, then the following
  11.  *    terms apply:
  12.  *
  13.  * (d)  This file may be freely copied and redistributed as long as:
  14.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  15.  *    2) If the file has been modified in any way, a notice of such
  16.  *      modification is conspicuously indicated.
  17.  *
  18.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  19.  *    Adobe Systems Incorporated.
  20.  * 
  21.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  22.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  23.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  24.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  25.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  26.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  27.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  28.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  29.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  30.  *    OF THIRD PARTY RIGHTS.
  31.  */
  32.  
  33. /*
  34.  *    DrawingViewWraps.psw
  35.  *
  36.  *
  37.  *    Version:    2.0
  38.  *    Author:    Ken Fromm
  39.  *    History:
  40.  *            03-07-91        Added this comment.
  41.  */
  42.  
  43. defineps PSWMarkTime ()
  44.     /StartTime realtime def
  45. endps
  46.  
  47. defineps PSWReturnTime (|int *ElapsedTime)
  48.     realtime StartTime sub 
  49.     ElapsedTime
  50. endps
  51.  
  52. defineps PSWCachestatus(|int Array[7])
  53.     cachestatus 7 -1 1 {1 roll} for 7 {Array} repeat
  54. endps
  55.  
  56. defineps PSWCurrentcacheparams(|int *Size, *Lower, *Upper)
  57.     currentcacheparams Upper Lower Size
  58. endps
  59.  
  60. defineps PSWSetcacheparams(int Size, Lower, Upper)
  61.     mark Size Lower Upper  setcacheparams
  62. endps
  63.  
  64. defineps PSWRmovetoShow(float X;  char Str[Num]; int  Num)
  65.     X 0 rmoveto  (Str) show
  66. endps
  67.  
  68. defineps PSWShow(char Str[Num]; int  Num)
  69.     (Str) show
  70. endps
  71.  
  72. defineps PSWAshow(float X, Y; char Str[Num]; int  Num)
  73.     X Y (Str) ashow
  74. endps
  75.  
  76. defineps PSWWidthshow(float X, Y; int C; char Str[Num]; int  Num)
  77.     X Y C (Str) widthshow
  78. endps
  79.  
  80. defineps PSWAwidthshow(float X, Y; int C; float AX, AY; char Str[Num]; int  Num)
  81.     X Y C AX AY (Str) awidthshow
  82. endps
  83.  
  84. /*
  85. *    Reencode the font, add BitmapWidths, ExactSize, InBetweenSize and
  86. *    TransformedChar entries set to 0 to force the use of outline fonts at all times.
  87. */
  88. defineps PSWCopyFont(char *F1; char *F2)
  89.     /F1 findfont dup begin
  90.     dup length 4 add dict begin
  91.         {
  92.             1 index /FID ne
  93.             2 index /UniqueID ne and
  94.             { def } {pop pop} ifelse
  95.         } forall
  96.         /FontName /F2 def
  97.  
  98.         /BitmapWidths false def
  99.         /ExactSize 0 def
  100.         /InBetweenSize 0 def
  101.         /TransformedChar 0 def
  102.  
  103.         /F2 currentdict definefont pop
  104.     end
  105.     end
  106. endps
  107.  
  108. defineps PSWSetFont(char *Name; float  Size)
  109.      /Name findfont [Size 0 0 Size neg 0 0 ] makefont setfont
  110. endps
  111.